
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <blockquote> 
 <p><strong>高级的题库更新之后，专业性更强了，不是真正从事这一行的，很难做出来。本人就是个小菜鸡，有一些题，我也不想不明白。题目的答案我尽可能的找到出处，如果读者发现错误或有补充建议，欢迎评论或私信笔者。笔者这篇就当抛砖引玉，各位读者可以当作考试的一个参考</strong></p> 
</blockquote> 
<h4><a name="t0"></a><a id="HarmonyOShttpsblogcsdnnetGusha_articledetails140072321spm1001201430015502_5"></a>基础认证题库请移步：<a href="https://blog.csdn.net/Gusha_/article/details/140072321?spm=1001.2014.3001.5502">HarmonyOS应用开发者基础认证题库</a></h4> 
<hr> 
<h3><a name="t1"></a><a id="20_8"></a><code>注：有读者反馈，题库的代码块比较多，打开文章时会卡死。所以笔者将题库拆分，以20道题为一组，题库目录如下，读者可以按需跳转。如果对您的阅读产生不便，笔者在这里向大家说声抱歉，请各位读者原谅。该题库已整理完毕，笔者不再更新。笔者连续考了三次，都过了，所以答案应该没什么太大问题。有需要题库文档的可以自取。祝各位读者好运(๑¯ω¯๑)。</code></h3> 
<h2><a name="t2"></a><a id="_10"></a>序号目录：</h2> 
<ul><li>单选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140295266?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580616?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580633?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号3</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140617294">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号4</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140749409?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 单选题序号5</a></li><li>多选题<br> <a href="https://blog.csdn.net/Gusha_/article/details/140580653?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号1</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140580668?spm=1001.2014.3001.5501">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号2</a><br> <a href="https://blog.csdn.net/Gusha_/article/details/140613052?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 多选题序号3</a></li><li>答案纯享版<br> <a href="https://blog.csdn.net/Gusha_/article/details/140676104?spm=1001.2014.3001.5502">HarmonyOS应用开发者高级认证，Next版本发布后最新题库 - 答案纯享版</a></li></ul> 
<hr> 
<h4><a name="t3"></a><a id="httpspanbaiducoms153tDk4dVv_MmLEyzOqW9hQpwdxkgr_24"></a>题库文档链接（自取）：https://pan.baidu.com/s/153tDk4dVv_MmLEyzOqW9hQ?pwd=xkgr</h4> 
<hr> 
<h2><a name="t4"></a><a id="_30"></a>注：题目是乱序，每次考试，选项的顺序都不同</h2> 
<h3><a name="t5"></a><a id="_09_093_32"></a>单选题题库 - 序号3</h3> 
<hr> 
<p>41、在方舟<a href="https://so.csdn.net/so/search?q=%E5%AD%97%E8%8A%82%E7%A0%81&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%AD%97%E8%8A%82%E7%A0%81&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;字节码\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%AD%97%E8%8A%82%E7%A0%81&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;字节码\&quot;}&quot;}" data-tit="字节码" data-pretit="字节码">字节码</a>的函数调用规范中，前三个参数表示的含义分别是</p> 
<p>​ A、new.Target、this、<a href="https://so.csdn.net/so/search?q=%E5%87%BD%E6%95%B0%E5%AF%B9%E8%B1%A1&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%87%BD%E6%95%B0%E5%AF%B9%E8%B1%A1&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;函数对象\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E5%87%BD%E6%95%B0%E5%AF%B9%E8%B1%A1&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;函数对象\&quot;}&quot;}" data-tit="函数对象" data-pretit="函数对象">函数对象</a>本身</p> 
<p>​ B、this、函数对象本身、new.Target</p> 
<p>​ C、new.Target、函数对象本身、this</p> 
<p>​ <code>D、函数对象本身、new.Target、this</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-bytecode-fundamentals-V5#%E5%87%BD%E6%95%B0%E8%B0%83%E7%94%A8%E8%A7%84%E8%8C%83" rel="nofollow">方舟字节码基本原理-学习ArkTS语言-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>42、下面关于方舟字节码格式IMM16_ID16_IMM8描述正确的是</p> 
<p>​ <code>A、8位操作码，16位立即数，16位id，8位立即数</code></p> 
<p>​ B、8位操作码，16位立即数，2个8位寄存器</p> 
<p>​ C、8位操作码，16位立即数，16位id，8位寄存器</p> 
<p>​ D、16位前缀操作码，16位立即数，8位寄存器</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/arkts-bytecode-fundamentals-V5#%E5%AD%97%E8%8A%82%E7%A0%81%E6%A0%BC%E5%BC%8F%E8%AF%B4%E6%98%8E" rel="nofollow">方舟字节码基本原理-学习ArkTS语言-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>43、以下关于垂直滚动Grid组件使用cachedCount属性的说明正确的是</p> 
<p>​ A、设置cachedCount为1，则Grid在显示范围上下各缓存1个Gridltem</p> 
<p>​ <code>B、设置cachedCount为1，则Grid在显示范围上下各缓存1行Gridltem</code></p> 
<p>​ C、设置cachedCount为1，则Grid在显示范围下方缓存1行Gridltem</p> 
<p>​ D、设置cachedCount为1，则Grid在显示范围下方缓存1个Gridltem</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-container-grid-V5#cachedcount" rel="nofollow">Grid-容器组件-ArkTS组件-ArkUI（方舟UI框架）-应用框架 - 华为HarmonyOS开发者 (huawei.com)</a></p> 
<hr> 
<p><strong>44、从桌面冷启动如下应用代码，点击Change按钮5次，整个过程中，代码中的2条log依次出现的次数是：（不确定，把所有选项列出）</strong></p> 
<pre data-index="0" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">class</span> <span class="token class-name">Data</span> <span class="token punctuation">{<!-- --></span>
  num<span class="token operator">:</span> <span class="token builtin">number</span>
  <span class="token keyword">type</span><span class="token operator">:</span> <span class="token builtin">string</span>

  <span class="token keyword">constructor</span><span class="token punctuation">(</span>num<span class="token operator">:</span> <span class="token builtin">number</span><span class="token punctuation">,</span> <span class="token keyword">type</span><span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>num <span class="token operator">=</span> num<span class="token punctuation">;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token keyword">type</span> <span class="token operator">=</span> <span class="token keyword">type</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

@Reusable
@Component
struct Item <span class="token punctuation">{<!-- --></span>
  @State data<span class="token operator">:</span> Data <span class="token operator">|</span> <span class="token keyword">undefined</span> <span class="token operator">=</span> <span class="token keyword">undefined</span><span class="token punctuation">;</span>

  <span class="token function">aboutToAppear</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token punctuation">{<!-- --></span>
    <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"Demo log1"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token function">aboutToReuse</span><span class="token punctuation">(</span>params<span class="token operator">:</span> ESObject<span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token punctuation">{<!-- --></span>
    <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"Demo 1og2"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token operator">=</span> params<span class="token punctuation">.</span>data
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Text</span><span class="token punctuation">(</span><span class="token string">"num = "</span> <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data<span class="token operator">?.</span>num <span class="token operator">+</span> <span class="token string">", type = "</span> <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data<span class="token operator">?.</span><span class="token keyword">type</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

@Entry
@Component
struct Index <span class="token punctuation">{<!-- --></span>
  data1<span class="token operator">:</span> Data <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Data</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">"type1"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  data2<span class="token operator">:</span> Data <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Data</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">,</span> <span class="token string">"type2"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  @State data<span class="token operator">:</span> Data <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data1

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>data<span class="token punctuation">.</span><span class="token keyword">type</span> <span class="token operator">==</span> <span class="token string">"type1"</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Item</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> data<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">reuseId</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>data<span class="token punctuation">.</span><span class="token keyword">type</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Item</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> data<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">reuseId</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>data<span class="token punctuation">.</span><span class="token keyword">type</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">'Change'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token operator">===</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data1<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data2
        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>data <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>data1
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:0,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、2,4</strong></p> 
<p>​ <strong>B、6,0</strong></p> 
<p>​ <code>C、1,0</code></p> 
<p>​ <strong>D、1,5</strong></p> 
<hr> 
<p>45、以下哪份代码可以实现下图Grid布局</p> 
<p><img src="https://i-blog.csdnimg.cn/direct/3e3c373cdba44b5680ea65c4292678f7.jpeg#pic_center" alt="在这里插入图片描述"></p> 
<pre data-index="1" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	A、通过设置Gridltem的columnStart和columnEnd</span>
@Entry
@Component
struct GridExample3 <span class="token punctuation">{<!-- --></span>
  numbers<span class="token operator">:</span> String<span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'0'</span><span class="token punctuation">,</span> <span class="token string">'1'</span><span class="token punctuation">,</span> <span class="token string">'2'</span><span class="token punctuation">,</span> <span class="token string">'3'</span><span class="token punctuation">,</span> <span class="token string">'4'</span><span class="token punctuation">,</span> <span class="token string">'5'</span><span class="token punctuation">,</span> <span class="token string">'6'</span><span class="token punctuation">,</span> <span class="token string">'7'</span><span class="token punctuation">,</span> <span class="token string">'8'</span><span class="token punctuation">,</span> <span class="token string">'9'</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> space<span class="token operator">:</span> <span class="token number">5</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>numbers<span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>day <span class="token operator">===</span> <span class="token string">'0'</span> <span class="token operator">||</span> day <span class="token operator">===</span> <span class="token string">'5'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xF9CF93</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">80</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">columnStart</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">columnEnd</span><span class="token punctuation">(</span><span class="token number">4</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xF9CF93</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">80</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> day<span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
      <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr 1fr 1fr 1fr'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xFAEEE0</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">350</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:1,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="2" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	B、通过设置不同Gridltem的宽度</span>
@Entry
@Component
struct GridExample3 <span class="token punctuation">{<!-- --></span>
  numbers<span class="token operator">:</span> String<span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'0'</span><span class="token punctuation">,</span> <span class="token string">'1'</span><span class="token punctuation">,</span> <span class="token string">'2'</span><span class="token punctuation">,</span> <span class="token string">'3'</span><span class="token punctuation">,</span> <span class="token string">'4'</span><span class="token punctuation">,</span> <span class="token string">'5'</span><span class="token punctuation">,</span> <span class="token string">'6'</span><span class="token punctuation">,</span> <span class="token string">'7'</span><span class="token punctuation">,</span> <span class="token string">'8'</span><span class="token punctuation">,</span> <span class="token string">'9'</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  columnGap<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">10</span>
  gridItemWidth<span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">80</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> space<span class="token operator">:</span> <span class="token number">5</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>numbers<span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token keyword">if</span> <span class="token punctuation">(</span>day <span class="token operator">===</span> <span class="token string">'0'</span> <span class="token operator">||</span> day <span class="token operator">===</span> <span class="token string">'5'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xF9CF93</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>gridItemWidth <span class="token operator">*</span> <span class="token number">4</span> <span class="token operator">+</span> <span class="token keyword">this</span><span class="token punctuation">.</span>columnGap <span class="token operator">*</span> <span class="token number">3</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">80</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
          <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
              <span class="token function">Text</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xF9CF93</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>gridItemWidth<span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">80</span><span class="token punctuation">)</span>
                <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> day<span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
      <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr 1fr 1fr 1fr'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>columnGap<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xFAEEE0</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">350</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:2,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="3" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	C、通过GridLayoutOptions</span>
@Entry
@Component
struct GridExample3 <span class="token punctuation">{<!-- --></span>
  numbers<span class="token operator">:</span> String<span class="token punctuation">[</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'0'</span><span class="token punctuation">,</span> <span class="token string">'1'</span><span class="token punctuation">,</span> <span class="token string">'2'</span><span class="token punctuation">,</span> <span class="token string">'3'</span><span class="token punctuation">,</span> <span class="token string">'4'</span><span class="token punctuation">,</span> <span class="token string">'5'</span><span class="token punctuation">,</span> <span class="token string">'6'</span><span class="token punctuation">,</span> <span class="token string">'7'</span><span class="token punctuation">,</span> <span class="token string">'8'</span><span class="token punctuation">,</span> <span class="token string">'9'</span><span class="token punctuation">]</span>
  scroller<span class="token operator">:</span> Scroller <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scroller</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
  layoutOptions1<span class="token operator">:</span> GridLayoutOptions <span class="token operator">=</span> <span class="token punctuation">{<!-- --></span>
    regularSize<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    irregularIndexes<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> space<span class="token operator">:</span> <span class="token number">5</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Grid</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>scroller<span class="token punctuation">,</span> <span class="token keyword">this</span><span class="token punctuation">.</span>layoutOptions1<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ForEach</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>numbers<span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">GridItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token function">Text</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">fontSize</span><span class="token punctuation">(</span><span class="token number">16</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">backgroundColor</span> <span class="token punctuation">(</span><span class="token number">0xF9CF93</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">80</span><span class="token punctuation">)</span>
              <span class="token punctuation">.</span><span class="token function">textAlign</span><span class="token punctuation">(</span>TextAlign<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
          <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">(</span>day<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> day<span class="token punctuation">)</span>
      <span class="token punctuation">}</span>
      <span class="token punctuation">.</span><span class="token function">columnsTemplate</span><span class="token punctuation">(</span><span class="token string">'1fr 1fr 1fr 1fr'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">columnsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">rowsGap</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">scrollBar</span><span class="token punctuation">(</span>BarState<span class="token punctuation">.</span>Off<span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">backgroundColor</span><span class="token punctuation">(</span><span class="token number">0xFAEEE0</span><span class="token punctuation">)</span>
      <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">350</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">align</span><span class="token punctuation">(</span>Alignment<span class="token punctuation">.</span>Center<span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:3,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、通过设置Gridltem的columnStart和columnEnd</p> 
<p>​ B、通过设置不同Gridltem的宽度</p> 
<p>​ <code>C、通过GridLayoutOptions</code></p> 
<hr> 
<p><strong>46、已知下列代码PageOne页面为navigation中的某一子页面，依次点击PageOne页面中toPageTwo按钮，PageTwo页面中toPageOne按钮，此时获取当前页面的路由栈数量为多少（不确定，把所有选项列出）</strong></p> 
<pre data-index="4" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// PageOne.ets</span>
@Component
<span class="token keyword">export</span> struct PageOneTmp <span class="token punctuation">{<!-- --></span>
  @<span class="token function">Consume</span><span class="token punctuation">(</span><span class="token string">'pageInfos'</span><span class="token punctuation">)</span> pageInfos<span class="token operator">:</span> NavPathStack<span class="token punctuation">;</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">NavDestination</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">'toPageTwo'</span><span class="token punctuation">,</span> <span class="token punctuation">{<!-- --></span> stateEffect<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token keyword">type</span><span class="token operator">:</span> ButtonType<span class="token punctuation">.</span>Capsule <span class="token punctuation">}</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'80%'</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">40</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">margin</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">this</span><span class="token punctuation">.</span>pageInfos<span class="token punctuation">.</span><span class="token function">pushPathByName</span><span class="token punctuation">(</span><span class="token string">'pageTwo'</span><span class="token punctuation">,</span><span class="token string">""</span><span class="token punctuation">)</span>
          <span class="token punctuation">}</span><span class="token punctuation">)</span>
      <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>     
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">title</span><span class="token punctuation">(</span><span class="token string">'pageOne'</span><span class="token punctuation">)</span>
    <span class="token punctuation">.</span><span class="token function">onBackPressed</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
      <span class="token keyword">const</span> popDestinationInfo <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>pageInfos<span class="token punctuation">.</span><span class="token function">pop</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
      <span class="token builtin">console</span><span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'pop返回值'</span> <span class="token operator">+</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>popDestinationInfo<span class="token punctuation">)</span><span class="token punctuation">)</span>
      <span class="token keyword">return</span> <span class="token boolean">true</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:4,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="5" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// PageTwo.ets</span>
<span class="token keyword">export</span> <span class="token keyword">class</span> <span class="token class-name">Pages</span><span class="token punctuation">{<!-- --></span>
  names<span class="token operator">:</span> <span class="token builtin">string</span> <span class="token operator">=</span> <span class="token string">""</span>
  values<span class="token operator">:</span> NavPathStack <span class="token operator">|</span> <span class="token keyword">null</span> <span class="token operator">=</span> <span class="token keyword">null</span>
<span class="token punctuation">}</span>

@Builder
<span class="token keyword">export</span> <span class="token keyword">function</span> <span class="token function">pageTwoTmp</span><span class="token punctuation">(</span>info<span class="token operator">:</span> Pages<span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
  <span class="token function">NavDestination</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
      <span class="token function">Button</span><span class="token punctuation">(</span><span class="token string">'toPageOne'</span><span class="token punctuation">,</span> <span class="token punctuation">{<!-- --></span> stateEffect<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token keyword">type</span><span class="token operator">:</span> ButtonType<span class="token punctuation">.</span>Capsule <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'80%'</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token number">40</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">margin</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
          <span class="token punctuation">(</span>info<span class="token punctuation">.</span>values <span class="token keyword">as</span> NavPathStack<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">pushPathByName</span><span class="token punctuation">(</span><span class="token string">'pageOne'</span><span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">width</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">height</span><span class="token punctuation">(</span><span class="token string">'100%'</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span><span class="token punctuation">.</span><span class="token function">title</span><span class="token punctuation">(</span><span class="token string">'pageTwo'</span><span class="token punctuation">)</span>
  <span class="token punctuation">.</span><span class="token function">onBackPressed</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
    <span class="token punctuation">(</span>info<span class="token punctuation">.</span>values <span class="token keyword">as</span> NavPathStack<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">pop</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token keyword">return</span> <span class="token boolean">true</span>
  <span class="token punctuation">}</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:5,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、1</strong></p> 
<p>​ <strong>B、2</strong></p> 
<p>​ <code>C、3</code></p> 
<p>​ <strong>D、4</strong></p> 
<hr> 
<p>47、在<span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;HarmonyOS应用\&quot;}&quot;}" data-tit="HarmonyOS应用" data-pretit="harmonyos应用">HarmonyOS应用</span>开发中，当开发者遇到需要分析Release版本应用的崩溃或异常堆栈信息时，为了准确地将堆栈追踪信息对应到源代码的具体位置，以下哪个描述是正确的做法或理解</p> 
<p>​ A、开发者需手动将Release构建生成的so文件与源代码进行映射，配合第三方工具进行堆栈信息还原，虽然过程繁琐，但最终能定位到问题代码位置</p> 
<p>​ B.因为Release应用经过优化和去除Debug信息 ，直接从堆栈跟踪到源代码行号是不可能的，开发者只能依靠日志信息手工推测问题所在</p> 
<p>​ <code>C、DevEco Studio提供的Release应用堆栈解析功能，要求开发者在遇到问题时，需上传构建产物中的特定文件（如so、source map、nameCache等）到指定工具或界面，借助这些文件辅助解析堆栈信息，实现从Release堆栈到源码的映射，便于快速定位问题</code></p> 
<p>​ D、DevEco Studio通过集成的Release应用堆栈解析功能，自动利用构建时产生的so文件、source map文件、nameCache文件等，无需额外操作即可直接在Release应用中提供详细的源码级堆栈追踪信息</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-release-app-stack-analysis-0000001814726289-V5" rel="nofollow">堆栈轨迹分析-故障分析-应用/服务调试-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>48、小李正在使用DevEco Studio进行Harmony0S应用的开发工作，他需要对一个频繁被调用的函数calculateData()进行重构，为了帮助小李高效地找到calculateData()函数的所有引用位置，并确保重构时考虑周全，以下哪个步骤是正确的使用DevEco Studio的“Find Usages”功能的操作方法</p> 
<p>​ A、小李应将光标置于calculateData()函数的名称上，按下Ctrl + Shift + F（<span class="words-blog hl-git-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.10283&quot;,&quot;extra&quot;:&quot;{\&quot;words\&quot;:\&quot;macOS\&quot;}&quot;}" data-tit="macOS" data-pretit="macos">macOS</span>为Command + Shift + F）全局搜索该函数名，然后在搜索结果中筛选出真正的调用位置。</p> 
<p>​ B、小李应该在菜单栏中选择“Navigate” &gt; “Class”来打开类浏览器， 从中找到calculateData()函数, 并在此界面中手动检查所有引用。</p> 
<p>​ <code>C、小李只需将光标定位在calculateData()函数名上，右键点击并选择“Find Usages"，或者直接使用快捷键Alt+ F7（macOS为Option+ F7），DevEco Studio会自动列出该函数在项目中的所有引用位置。</code></p> 
<p>​ D、小李应当在项目目录树中找到calculateData()函数所在的文件， 直接双击打开文件，然后逐行扫描代码以手动查找该函数的所有调用位置。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-editer-overview-0000001053502418-V5#section16665161301116" rel="nofollow">代码阅读-代码编辑-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>49、在使用DevEco Studio的Profiler进行HarmonyOS应用或服务性能分析时，面对应用出现卡顿、加载慢等性能瓶颈问题，以下哪个描述最贴切地说明了“Time场景分析任务”的功能及其对开发者优化流程的帮助</p> 
<p>​ A、Time场景分析任务仅提供应用/服务运行时的CPU使用率概览，帮助开发者粗略判断性能瓶颈，但不提供深入分析</p> 
<p>​ B、Time场景分析任务专注于<span class="edu-hl hl hl-1" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;内存管理\&quot;}&quot;}" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;word\&quot;:\&quot;内存管理\&quot;}&quot;}" data-tit="内存管理" data-pretit="内存管理">内存管理</span>，帮助开发者监控应用内存泄漏，但对解决卡顿和加载耗时问题帮助有限</p> 
<p>​ C、Time场景分析任务在应用运行时，通过显示所有函数执行的耗时排序列表，辅助开发者手动对比寻找耗时最短的函数进行优化</p> 
<p>​ <code>D、Time场景分析任务展示热点区域内的CPU和进程级调用栈耗时情况，支持代码跳转，助力开发者快速定位并优化耗时较长的代码段</code></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-insight-session-time-0000001532505669-V5" rel="nofollow">基础耗时分析：Time分析-性能分析-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>50、开发者小林正在使用DevEco Studio开发一款HarmonyOS应用， 并在真机上进行调试。他在运行应用的过程中突然发现一处UI布局需要微调，希望在不中断当前应用运行的情况下看到调整效果，基于DevEco Studio提供的Hot Reload (热重载)能力，以下哪一种做法能让小林最有效地实现他的需求</p> 
<p>​ A、继续运行应用，手动重启应用后检查布局是否符合预期</p> 
<p>​ <code>B、在不关闭应用的情况下，直接修改代码并保存，借助Hot Reload功能在真机上实时查看布局调整的效果</code></p> 
<p>​ C、使用模拟器替代真机进行调试，因为Hot Reload仅在模拟器上支持代码改动的即时生效</p> 
<p>​ D、立即停止应用，修改代码后重新编译并部署到真机上</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hot-reload-0000001527628941-V5" rel="nofollow">Hot Reload-代码调试-应用/服务调试-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>51、项目需要为不同的设备形态（如手机、智能手表）提供定制化构建。请说明如何在DevEco studio中设置不同的构建配置，以生成针对不同设备的hap包？（不确定，把所有选项列出）</strong></p> 
<p>​ <strong>A、在工程级别build-profile.json5定义多个product，在每个product的config/distributionFilter中定义不同的设备类型</strong></p> 
<p>​ <strong>B、在工程级别build-profile.json5定义多个product，在每个product的config/deviceType中定义不同的设备类型</strong></p> 
<p>​ <code>C、在模块级别build-profile.json5定义多个target，在每个target的config/deviceType中定义不同的设备类型</code></p> 
<p>​ <strong>D、在模块级别build-profile.json5定义多个target，在每个target的config/distributionFilter中定义不同的设备类型</strong></p> 
<hr> 
<p>52、一个复杂的项目，该项目不仅包含主入口模块（Entry Module），还有多个特性的功能模块（Feature Modules/HSP），并且这些模块存在着相互调用关系。为了确保在调试过程中能够完整地测试所有交互逻辑，需要将涉及到的所有模块的HAP包都部署到目标设备上。请从以下选项中选择正确的操作步骤来配置DevEco Studio，以便一次性部署和调试项目中的多个模块</p> 
<p>​ A、无需特殊配置，DevEco Studio会自动检测到项目中的所有模块依赖，并在每次调试运行时自动部署所有相关HAP包。</p> 
<p>​ B、在项目结构界面手动选择每个模块，单独编译并逐一将生成的HAP包通过HDC命令推送到设备上。</p> 
<p>​ <code>C、进入“Run &gt; Edit Configurations”菜单，“Deploy Multi Hap”选项卡下，勾选“Deploy Multi Hap Packages”，随后在列表中选择需要部署的模块。</code></p> 
<p>​ D、直接点击运行按钮，DevEco Studio会弹出对话框询问需要部署哪些模块，从中选择需要的模块后开始调试。</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-run-debug-configurations-0000001760344518-V5#section393005432811" rel="nofollow">自定义运行/调试配置-应用/服务调试-DevEco Studio | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>53、项目中涉及多个类的继承与重写。为了快速实现子类对父类方法的重写，小华想利用DevEco Studio提供的便捷功能来提高开发效率。他了解到，通过一个特定的操作流程，可以直接依据父类的模板生成子类中需要重写的方法代码，而无需手动编写完整方法体，在DevEco Studio中，如何正确使用Override Methods功能来快速生成子类需要重写的方法代码</p> 
<p>​ A、将光标放置于任何代码行，按下Ctrl+B，然后在弹出菜单中选择Override Methods，之后勾选需要重写的方法并确认。</p> 
<p>​ B、在项目结构视图中找到目标子类，双击打开后直接在代码编辑区输入重写方法的签名，DevEco Studio将自动完成剩余代<br> 码。</p> 
<p>​ C、通过菜单栏File &gt; Settings，配置Override Methods快捷方式，之后在代码中仅需选中父类方法名，即可自动在子类中生<br> 成重写代码。</p> 
<p>​ <code>D、将光标定位到子类的定义处，按下Ctrl+O（或右键单击选择Generate... &gt; Override Methods），在弹出的对话框中选择 要重写的方法，点击OK完成生成。</code></p> 
<hr> 
<p>54、下面的配置存在有几处错误（）</p> 
<pre data-index="6" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	module.json5配置文件:</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string">"module"</span><span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>
		<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"entry"</span><span class="token punctuation">,</span>
		<span class="token comment">// ...</span>
		<span class="token string">"abilities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
			<span class="token punctuation">{<!-- --></span>
				<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"EntryAbility"</span><span class="token punctuation">,</span>
				<span class="token string">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./ets/entryability/EntryAbility.ets"</span><span class="token punctuation">,</span>
				<span class="token comment">// ...</span>
				<span class="token string">"skills"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
					<span class="token punctuation">{<!-- --></span>
						<span class="token string">"entities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
							<span class="token string">"entity.system.home"</span>
						<span class="token punctuation">]</span><span class="token punctuation">,</span>
						<span class="token string">"actions"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
							<span class="token string">"ohos.want.action.home"</span>
						<span class="token punctuation">]</span>
					<span class="token punctuation">}</span>
				<span class="token punctuation">]</span><span class="token punctuation">,</span>
				<span class="token string">"metadata"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
					<span class="token punctuation">{<!-- --></span>
						<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"ohos.entry.shortcuts"</span><span class="token punctuation">,</span>
						<span class="token string">"resource"</span><span class="token operator">:</span> <span class="token string">"$profile:shortcuts_config"</span>
					<span class="token punctuation">}</span>
				<span class="token punctuation">]</span>
			<span class="token punctuation">}</span>
		<span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:6,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="7" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	在/resources/base/profile/目录下配置shortcuts_config.json配置文件:</span>
<span class="token punctuation">{<!-- --></span>
	<span class="token string">"shortcuts"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
			<span class="token string">"shortcutId"</span><span class="token operator">:</span> <span class="token string">"id_test1"</span><span class="token punctuation">,</span>
            <span class="token comment">//	==========================	【shortcutLabel】字符串不符合匹配规则</span>
			<span class="token string">"label"</span><span class="token operator">:</span> <span class="token string">"shortcutLabel"</span><span class="token punctuation">,</span>
			<span class="token string">"icon"</span><span class="token operator">:</span> <span class="token string">"$media:shortcutIcon"</span><span class="token punctuation">,</span>
			<span class="token string">"wants"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
				<span class="token punctuation">{<!-- --></span>
					<span class="token string">"bundleName"</span><span class="token operator">:</span> <span class="token string">"com.ohos.hello"</span><span class="token punctuation">,</span>
					<span class="token string">"moduleName"</span><span class="token operator">:</span> <span class="token string">"entry"</span><span class="token punctuation">,</span>
					<span class="token string">"abilityName"</span><span class="token operator">:</span> <span class="token string">"EntryAbility"</span>
				<span class="token punctuation">}</span>
			<span class="token punctuation">]</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:7,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code>A、1</code></p> 
<p>​ B、2</p> 
<p>​ C、3</p> 
<p>​ D、4</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/module-configuration-file-V5#shortcuts%E6%A0%87%E7%AD%BE" rel="nofollow">module.json5配置文件-应用配置文件（Stage模型）-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>55、下面的配置存在有几处错误（）（不确定，把所有选项列出）</strong></p> 
<pre data-index="8" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	app.json5配置文件:</span>
<span class="token punctuation">{<!-- --></span>
  <span class="token string">"app"</span><span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>

    <span class="token string">"bundleName"</span><span class="token operator">:</span> <span class="token string">"com.example.myapplication"</span><span class="token punctuation">,</span>

    <span class="token string">"vendor"</span><span class="token operator">:</span> <span class="token string">"example"</span><span class="token punctuation">,</span>

    <span class="token string">"versionCode"</span><span class="token operator">:</span> <span class="token number">1000000</span><span class="token punctuation">,</span>

    <span class="token string">"versionName"</span><span class="token operator">:</span> <span class="token string">"1.0.2"</span><span class="token punctuation">,</span>

    <span class="token string">"icon"</span><span class="token operator">:</span> <span class="token string">"$media:app_icon"</span><span class="token punctuation">,</span>

    <span class="token string">"label"</span><span class="token operator">:</span> <span class="token string">"$string:app_name"</span><span class="token punctuation">,</span>

    <span class="token string">"bundleType"</span><span class="token operator">:</span> <span class="token string">"app"</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:8,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="9" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// module.json5配置文件:</span>
<span class="token punctuation">{<!-- --></span>
    
	<span class="token string">"module"</span><span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>
        
		<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"feature"</span><span class="token punctuation">,</span>

   		<span class="token comment">//...</span>
        
		<span class="token string">"atomicService"</span><span class="token operator">:</span> <span class="token punctuation">{<!-- --></span>
        
			<span class="token string">"preloads"</span><span class="token operator">:</span><span class="token punctuation">[</span>
            
				<span class="token punctuation">{<!-- --></span>
                
					<span class="token string">"moduleName"</span><span class="token operator">:</span> <span class="token string">"feature"</span>
                
				<span class="token punctuation">}</span>
			<span class="token punctuation">]</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:9,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、1</strong></p> 
<p>​ <code>B、2</code></p> 
<p>​ <strong>C、3</strong></p> 
<p>​ <strong>D、4</strong></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/app-configuration-file-V5#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A0%87%E7%AD%BE" rel="nofollow">app.json5配置文件-应用配置文件（Stage模型）-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/module-configuration-file-V5#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%A0%87%E7%AD%BE" rel="nofollow">module.json5配置文件-应用配置文件（Stage模型）-开发基础知识-基础入门 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>56、（1）在UIAbility的onCreate生命周期中通过EventHub的on注册“event1”和“event2”事件。</p> 
<pre data-index="10" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> hilog <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.PerformanceAnalysisKit'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> UIAbility<span class="token punctuation">,</span> Want<span class="token punctuation">,</span> AbilityConstant <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.AbilityKit'</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> <span class="token constant">DOMAIN_NUMBER</span><span class="token operator">:</span> <span class="token builtin">number</span> <span class="token operator">=</span> <span class="token number">0xFF00</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> <span class="token constant">TAG</span><span class="token operator">:</span> <span class="token builtin">string</span> <span class="token operator">=</span> <span class="token string">'[EventAbility]'</span><span class="token punctuation">;</span>

<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">class</span> <span class="token class-name">EntryAbility</span> <span class="token keyword">extends</span> <span class="token class-name">UIAbility</span> <span class="token punctuation">{<!-- --></span>

  <span class="token function">onCreate</span><span class="token punctuation">(</span>want<span class="token operator">:</span> Want<span class="token punctuation">,</span> launchParam<span class="token operator">:</span> AbilityConstant<span class="token punctuation">.</span>LaunchParam<span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token punctuation">{<!-- --></span>

    <span class="token comment">//获取UlAbility实例的上下文</span>
    <span class="token keyword">let</span> context <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">;</span>

    <span class="token comment">//获取eventHub</span>
    <span class="token keyword">let</span> eventhub <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">.</span>eventHub<span class="token punctuation">;</span>

    <span class="token comment">//执行订阅操作</span>
    eventhub<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'event1'</span><span class="token punctuation">,</span> <span class="token keyword">this</span><span class="token punctuation">.</span>eventFunc<span class="token punctuation">)</span><span class="token punctuation">;</span>
    eventhub<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'event2'</span><span class="token punctuation">,</span> <span class="token keyword">this</span><span class="token punctuation">.</span>eventFunc<span class="token punctuation">)</span><span class="token punctuation">;</span>

    hilog<span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token constant">DOMAIN_NUMBER</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'%{public}s'</span><span class="token punctuation">,</span> <span class="token string">'Ability onCreate'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token comment">// ..</span>

  <span class="token function">eventFunc</span><span class="token punctuation">(</span>argOne<span class="token operator">:</span> Context<span class="token punctuation">,</span> argTwo<span class="token operator">:</span> Context<span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token punctuation">{<!-- --></span>
    hilog<span class="token punctuation">.</span><span class="token function">info</span><span class="token punctuation">(</span><span class="token constant">DOMAIN_NUMBER</span><span class="token punctuation">,</span> <span class="token constant">TAG</span><span class="token punctuation">,</span> <span class="token string">'receive.'</span> <span class="token operator">+</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span>argOne<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">,</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${<!-- --></span>argTwo<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:10,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>（2）在UI组件的click处理事件中调用如下的eventHubFunc，连续点击2次该控件后，运行日志输出是什么：</p> 
<pre data-index="11" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">// 题目获取上下文的方式是错的，要导这个common包才行</span>
<span class="token keyword">import</span> common <span class="token keyword">from</span> <span class="token string">'@ohos.app.ability.common'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{<!-- --></span> promptAction <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@kit.ArkUI'</span><span class="token punctuation">;</span>

@Entry
@Component
struct Page_EventHub <span class="token punctuation">{<!-- --></span>

  <span class="token keyword">private</span> context <span class="token operator">=</span> <span class="token function">getContext</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span> <span class="token keyword">as</span> common<span class="token punctuation">.</span>UIAbilityContext<span class="token punctuation">;</span>

  <span class="token function">eventHubFunc</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">.</span>eventHub<span class="token punctuation">.</span><span class="token function">emit</span><span class="token punctuation">(</span><span class="token string">'event1'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">.</span>eventHub<span class="token punctuation">.</span><span class="token function">emit</span><span class="token punctuation">(</span><span class="token string">'event2'</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token string">'test2'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span>context<span class="token punctuation">.</span>eventHub<span class="token punctuation">.</span><span class="token function">off</span><span class="token punctuation">(</span><span class="token string">'event1'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>

  <span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    <span class="token function">Column</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
      <span class="token comment">//...</span>
      <span class="token function">List</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span> initialIndex<span class="token operator">:</span> <span class="token number">0</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token function">ListItem</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
          <span class="token function">Row</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">//...</span>
          <span class="token punctuation">}</span>
          <span class="token punctuation">.</span><span class="token function">onClick</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">eventHubFunc</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            promptAction<span class="token punctuation">.</span><span class="token function">showToast</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
              message<span class="token operator">:</span> <span class="token function">$r</span><span class="token punctuation">(</span><span class="token string">'app.string.EventHubFuncA'</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
          <span class="token punctuation">}</span><span class="token punctuation">)</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span>
      <span class="token comment">//...</span>
    <span class="token punctuation">}</span>
    <span class="token comment">//...</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:11,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、</p> 
<pre data-index="12" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Examp1e<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span> <span class="token punctuation">]</span>
<span class="token punctuation">[</span>Examp1e<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span><span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:12,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <code>B、答案↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓</code></p> 
<pre data-index="13" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Examp1e<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span><span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:13,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ C、</p> 
<pre data-index="14" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token punctuation">[</span>Examp1e<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span><span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:14,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ D、</p> 
<pre data-index="15" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">,</span><span class="token string">"test2"</span><span class="token punctuation">]</span>
<span class="token punctuation">[</span>Example<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>Entry<span class="token punctuation">]</span><span class="token punctuation">.</span><span class="token punctuation">[</span>EntryAbility<span class="token punctuation">]</span> receive<span class="token punctuation">.</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:15,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<hr> 
<p>57、singleton模式的UIAbility，在冷启动时生命周期的执行顺序是：</p> 
<p>​ <code>A、onCreate-&gt;onWindowStageCreate-&gt;onForeground</code></p> 
<p>​ B、onCreate-&gt;onBackground-&gt;onForeground</p> 
<p>​ C、onCreate -&gt;onForeground-&gt;onWindowStageCreate</p> 
<p>​ D、onCreate-&gt;onBackground-&gt;onWindowStageCreate</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/uiability-lifecycle-V5#windowstagecreate%E5%92%8Cwindowstagedestroy%E7%8A%B6%E6%80%81" rel="nofollow">UIAbility组件生命周期-UIAbility组件-Stage模型应用组件-Stage模型开发指导-Ability Kit（程序框架服务）-应用框架 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p><strong>58、开发者开发了一个应用，该应用只有一个hap包，其module.json5中abilities的配置如下所示，包含1个UlAbility（无Web组件）、1个FormExtensionAbility组件 、1个WorkSchedulerExtensionAbility组件，那么该应用在运行过程中，最多会存在几个应用进程：（不确定，把所有选项列出）</strong></p> 
<pre data-index="16" class="set-code-hide prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token string">"abilities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
    
	<span class="token punctuation">{<!-- --></span>
        
		<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"EntryAbility"</span><span class="token punctuation">,</span>
        
		<span class="token string">"srcEntry"</span><span class="token operator">:</span> <span class="token string">"./etc/entryability/EntryAbility.ts"</span><span class="token punctuation">,</span>
        
		<span class="token string">"description"</span><span class="token operator">:</span> <span class="token string">"$string:EntryAbility_desc"</span><span class="token punctuation">,</span>
        
		<span class="token string">"exported"</span><span class="token operator">:</span> ture
        
	<span class="token punctuation">}</span>
    
<span class="token punctuation">]</span><span class="token punctuation">,</span>
    
<span class="token string">"extensionAbilities"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
    
	<span class="token punctuation">{<!-- --></span>	
        
		<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"ClockFormExtensionAbility"</span><span class="token punctuation">,</span>
        
		<span class="token string">"srcEntrance"</span><span class="token operator">:</span> <span class="token string">"./ets/form/ClockFormExtensionAbility.ts"</span><span class="token punctuation">,</span>
    	    
		<span class="token string">"type"</span><span class="token operator">:</span> <span class="token string">"form"</span>
        
	<span class="token punctuation">}</span><span class="token punctuation">,</span>
    
	<span class="token punctuation">{<!-- --></span>
        
		<span class="token string">"name"</span><span class="token operator">:</span> <span class="token string">"TipWorkSchedulerExtensionAbility"</span><span class="token punctuation">,</span>

		<span class="token string">"srcEntrance"</span><span class="token operator">:</span> <span class="token string">"./ets/service/TipWorkSchedulerExtensionAbility.ts"</span><span class="token punctuation">,</span>
        
		<span class="token string">"type"</span><span class="token operator">:</span> <span class="token string">"workScheduler"</span>
        
	<span class="token punctuation">}</span>
    
<span class="token punctuation">]</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:16,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ <strong>A、1个</strong></p> 
<p>​ <strong>B、2个</strong></p> 
<p>​ <code>C、3个</code></p> 
<p>​ <strong>D、4个</strong></p> 
<hr> 
<p>59、hiAppEvent提供的Watcher接口，需要订阅到OS的崩溃事件，正确的实现方式（）</p> 
<pre data-index="17" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	A</span>
hiAppEvent<span class="token punctuation">.</span><span class="token function">addWatcher</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
	name<span class="token operator">:</span> <span class="token string">"watcher"</span><span class="token punctuation">,</span>
	appEventFilters<span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{<!-- --></span>
			names<span class="token operator">:</span> <span class="token punctuation">[</span>hiAppEvent<span class="token punctuation">.</span>event<span class="token punctuation">.</span><span class="token constant">APP_FREEZE</span><span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
	<span class="token punctuation">]</span><span class="token punctuation">,</span>
	<span class="token function-variable function">onReceive</span><span class="token operator">:</span> <span class="token punctuation">(</span>domain<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">,</span> appEventGroups<span class="token operator">:</span> <span class="token builtin">Array</span><span class="token operator">&lt;</span>hiAppEvent<span class="token punctuation">.</span>AppEventGroup<span class="token operator">&gt;</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:17,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="18" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	B</span>
hiAppEvent<span class="token punctuation">.</span><span class="token function">addWatcher</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
	name<span class="token operator">:</span> <span class="token string">"watcher"</span><span class="token punctuation">,</span>
	<span class="token function-variable function">onReceive</span><span class="token operator">:</span> <span class="token punctuation">(</span>domain<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">,</span> appEventGroups<span class="token operator">:</span> <span class="token builtin">Array</span><span class="token operator">&lt;</span>hiAppEvent<span class="token punctuation">.</span>AppEventGroup<span class="token operator">&gt;</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:18,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="19" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	C</span>
hiAppEvent<span class="token punctuation">.</span><span class="token function">addWatcher</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
	name<span class="token operator">:</span> <span class="token string">"watcher"</span><span class="token punctuation">,</span>
	appEventFilters<span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
			domain<span class="token operator">:</span> hiAppEvent<span class="token punctuation">.</span>domain<span class="token punctuation">.</span><span class="token constant">OS</span><span class="token punctuation">,</span>
			names<span class="token operator">:</span> <span class="token punctuation">[</span>hiAppEvent<span class="token punctuation">.</span>event<span class="token punctuation">.</span><span class="token constant">APP_CRASH</span><span class="token punctuation">]</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">]</span><span class="token punctuation">,</span>
	<span class="token function-variable function">onReceive</span><span class="token operator">:</span> <span class="token punctuation">(</span>domain<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">,</span> appEventGroups<span class="token operator">:</span> <span class="token builtin">Array</span><span class="token operator">&lt;</span>hiAppEvent<span class="token punctuation">.</span>AppEventGroup<span class="token operator">&gt;</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{<!-- --></span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:19,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<pre data-index="20" class="set-code-show prettyprint"><code class="prism language-typescript has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//	D</span>
hiAppEvent<span class="token punctuation">.</span><span class="token function">addWatcher</span><span class="token punctuation">(</span><span class="token punctuation">{<!-- --></span>
	name<span class="token operator">:</span> <span class="token string">"watcher"</span><span class="token punctuation">,</span>
	appEventFilters<span class="token operator">:</span> <span class="token punctuation">[</span>
		<span class="token punctuation">{<!-- --></span>
			domain<span class="token operator">:</span> hiAppEvent<span class="token punctuation">.</span>domain<span class="token punctuation">.</span><span class="token constant">OS</span><span class="token punctuation">,</span>
			names<span class="token operator">:</span> <span class="token punctuation">[</span>hiAppEvent<span class="token punctuation">.</span>event<span class="token punctuation">.</span><span class="token constant">APP_CRASH</span><span class="token punctuation">]</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
<div class="hljs-button {2} add_def" data-title="复制"></div></code><ul class="pre-numbering" style="opacity: 0.759277;"><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul><button class="btn-code-notes mdeditor" data-report-click="{&quot;spm&quot;:&quot;3001.10436&quot;,&quot;extra&quot;:{&quot;index&quot;:20,&quot;runIdx&quot;:-1}}">代码解读</button></pre> 
<p>​ A、A</p> 
<p>​ B、B</p> 
<p>​ <code>C、C</code></p> 
<p>​ D、D</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/hiappevent-watcher-crash-events-arkts-V5#%E5%BC%80%E5%8F%91%E6%AD%A5%E9%AA%A4" rel="nofollow">订阅崩溃事件（ArkTS）-崩溃事件-系统事件-事件订阅-HiAppEvent使用指导-Performance Analysis Kit（性能分析服务）-调测调优-系统 | 华为开发者联盟 (huawei.com)</a></p> 
<hr> 
<p>60、当标记了@Reuseable的自定义组件实现了组件复用后，这个组件的复用范围是什么？</p> 
<p>​ A、标记了@Reuseable的自定义组件的外层容器节点范围内</p> 
<p>​ <code>B、标记了@Reuseable的自定义组件的父组件范围内</code></p> 
<p>​ C、整个页面都可以复用</p> 
<p>​ D、整个应用内都可以复用</p> 
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices-V5/bpta-component-reuse-V5#section1048675564013" rel="nofollow">组件复用最佳实践-开发高性能ArkUI-性能优化-性能 | 华为开发者联盟 (huawei.com)</a></p> 
<hr>
                